import {request} from '../request'
import type {comanyList,userInfo} from '../../type/type'
import { File } from '../../miniprogram_npm/@vant/weapp/uploader/utils'
//公司列表
export const getCompanyList = ()=>request.post<{
    code:Number,
    msg:String,
    data:comanyList[],
}>('/login/selectCompanyThing')
//登录
export const login = (
    code:String,
    comID?:Number,
    userName?:String,
    password?:String
) =>request.post<{
    code:Number,
    msg:String,
    data:userInfo[],
}>('/login/toLogin',{code,comID,userName,password})
//获取天气
export const getWeather = (comID:number,city:String) =>request.post('/weather/selectWeather',{comID,city})
//图片上传
export const imgUpload = (file:File) =>request.post('/picture/pictureUpload',{file})
//退出登录
export const backLogin = (openID:string,comID:number,userID:number) =>request.post('/login/updateLoginStatus',{openID,comID,userID})